﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
<head>
<%@ include file="/include/include.jsp" %>
</head>

<body>
	
	<%@ include file="/include/header.jsp" %>

	<%@ include file="/include/menu.jsp" %>
	
			
	<div id="mainContent">
		<h2><a href="${ctx}/${menu.url}">${menu.description}</a>&nbsp;-&nbsp;<a href="${ctx}/${empty currViewBarSubMenu_ ? submenu.url : currViewBarSubMenu_.url}">${empty currViewBarSubMenu_ ? submenu.description : currViewBarSubMenu_.description}</a></h2>
		<div class="tool-bar">
			<!-- 
			<div title="${menu.description} - ${empty currViewBarSubMenu_ ? submenu.description : currViewBarSubMenu_.description} - 导入${empty currViewBarSubMenu_ ? submenu.description : currViewBarSubMenu_.description}"  href="${ctx}/warehouse/stock/import" class="modal-window modal-link">导入仓储产品</div>
			-->
			
			
			<div title="${menu.description} - ${empty currViewBarSubMenu_ ? submenu.description : currViewBarSubMenu_.description} - 查询${empty currViewBarSubMenu_ ? submenu.description : currViewBarSubMenu_.description}"  href="${ctx}/warehouse/inventoryrecord/search/filter" class="modal-window modal-link">过滤查询</div>
			<div title="${menu.description} - ${empty currViewBarSubMenu_ ? submenu.description : currViewBarSubMenu_.description} - 查询${empty currViewBarSubMenu_ ? submenu.description : currViewBarSubMenu_.description}"  href="${ctx}/warehouse/inventoryrecord/list/toexport" class="modal-window modal-link">导出仓储产品</div>
		</div>
		<form action="${ctx}/warehouse/inventoryrecord/waresearch" method="post" id="warehouseForm">
			<h2>仓储编号 :&nbsp;&nbsp; <a href="${ctx}/warehouse/inventoryrecord/search/filter/do?beginDate=<fmt:formatDate value="${beginDate}" pattern="yyyy-MM-dd"/>&endDate=<fmt:formatDate value="${endDate}" pattern="yyyy-MM-dd"/>" >${warehouse.code }</a>&nbsp;-&nbsp;仓储名称 :&nbsp;&nbsp;<a href="${ctx}/warehouse/inventoryrecord/search/filter/do?beginDate=<fmt:formatDate value="${beginDate}" pattern="yyyy-MM-dd"/>&endDate=<fmt:formatDate value="${endDate}" pattern="yyyy-MM-dd"/>" >${warehouse.name}</a></h2>
		</form>
		
		
		<div class="grid-list">
			<table class="grid" cellspacing="0"  url="${ctx}/warehouse/inventoryrecord/waresearch/${warehouse.id}/view?beginDate=<fmt:formatDate value="${beginDate}" pattern="yyyy-MM-dd"/>&endDate=<fmt:formatDate value="${endDate}" pattern="yyyy-MM-dd"/>">
				<thead>
					<tr>
						<td >PO单号</td>
						<td>DO单号</td>
						<td orderBy_="inventoryrecord.product.productCode" class="${orderParameters['inventoryrecord.product.productCode']}">产品编码</td>
						<td orderBy_="inventoryrecord.product.productName" class="${orderParameters['inventoryrecord.product.productName']}">产品名称</td>
						<td>操作类型</td>
						<td>状态</td>
						<td>出库日期</td>
						<td>补货日期</td>
						<td>数量 </td>
					</tr>
				</thead>
				<tbody>
					<c:forEach var="inventoryRecord" items="${inventoryRecords}">
					
						<tr onmouseover="this.style.backgroundColor= '#A0CFEC'" onmouseout="this.style.backgroundColor= '#ffffff'"  >
							<td>
									<a href="${ctx}/purchase/purchasedetails/${inventoryRecord.purchaseOrder.id}">	
											${inventoryRecord.purchaseOrder.orderNumber}
										</a>
								</td>
							<td>
								<a href="${ctx}/delivery/deliverydetails/${inventoryRecord.deliveryOrder.id}">	
											${inventoryRecord.deliveryOrder.number}
										</a>
							</td>
							<td>${inventoryRecord.product.productCode}</td>
							<td> ${inventoryRecord.product.productName}</td>
							<td>${inventoryRecord.inventoryOperationDislpaly }</td>
							<c:choose>
								<c:when test="${inventoryRecord.lastInventoryOperation eq 'OUT' || inventoryRecord.lastInventoryOperation eq 'TRANSFERRED' || inventoryRecord.lastInventoryOperation eq 'TURE_OUT'}">
									<td>${inventoryRecord.addProductFlagDisplayText}</td>
								</c:when>	
								<c:otherwise>
									<td>&nbsp;</td>
								</c:otherwise>
							</c:choose>
								<c:choose>
								<c:when test="${inventoryRecord.lastInventoryOperation eq 'REPLENISHMENT'}">
									<td>&nbsp;</td>
								</c:when>	
								<c:otherwise>
									<td><fmt:formatDate value="${inventoryRecord.operationDate}" pattern="yyyy-MM-dd"/></td>
								</c:otherwise>
							</c:choose>
							<c:choose>
								<c:when test="${not empty inventoryRecord.addProductDate}">
									<td><fmt:formatDate value="${inventoryRecord.addProductDate}" pattern="yyyy-MM-dd"/></td>
								</c:when>	
								<c:otherwise>
									<td>&nbsp;</td>
								</c:otherwise>
							</c:choose>
							<td>${inventoryRecord.amount}</td>
							
							<!-- 
								<td>${inventoryRecordObject[0]}</td>
								<td>${inventoryRecordObject[1]}</td>
								<td>${inventoryRecordObject[2] }</td>
								
								<td class='errorMsg'>
								
									<a href="${ctx}/warehouse/inventoryrecord/out/${warehouse.id}/${inventoryRecordObject[7]}/?beginDate=<fmt:formatDate value="${beginDate}" pattern="yyyy-MM-dd"/>&endDate=<fmt:formatDate value="${endDate}" pattern="yyyy-MM-dd"/>" >${inventoryRecordObject[3]}</a>
								</td>
								<td class='errorMsg'>
									${inventoryRecordObject[4]}
								</td>
								<td class='errorMsg'>
									${inventoryRecordObject[5]}
								</td>
								<td class='infoMsg'>
									<a href="${ctx}/warehouse/inventoryrecord/replenishment/${warehouse.id}/${inventoryRecordObject[7]}/?beginDate=<fmt:formatDate value="${beginDate}" pattern="yyyy-MM-dd"/>&endDate=<fmt:formatDate value="${endDate}" pattern="yyyy-MM-dd"/>">${inventoryRecordObject[6]}</a>
								</td>
								<td class='errorMsg'>
									${(inventoryRecordObject[3] + inventoryRecordObject[4] + inventoryRecordObject[5] )- inventoryRecordObject[6] }
								</td>
								 -->
						</tr>
					</c:forEach>
				</tbody>
			</table>
				
			<t:page action="${ctx}/warehouse/inventoryrecord/search/filter/do/" />
			
		</div>
	</div>
	
	<%@ include file="/include/script.jsp" %>
	
</body>

</html> 